package com.liao.badminton.dto;

import com.liao.badminton.code.BaseField;
import com.liao.badminton.code.validation.Delete;
import com.liao.badminton.code.validation.Insert;
import com.liao.badminton.code.validation.Update;
import io.swagger.annotations.ApiModelProperty;
import com.liao.badminton.entity.SystemSmsLog;
import javax.validation.constraints.NotNull;
import java.util.List;
import lombok.Data;
import com.liao.badminton.code.validation.FindDetail;
import java.lang.String;
import java.util.Date;

/**
* @author liaocheng
* @date 2024-11-01
* description:短信日志
*/
@Data
public class SystemSmsLogDto extends BaseField {

    @ApiModelProperty(value = "编号")
    @NotNull(message = "主键id不能为空",groups = {Update.class, FindDetail.class})
    private Long id;

    @ApiModelProperty(value = "短信渠道编号")
    private Long channelId;

    @ApiModelProperty(value = "短信渠道编码")
    private String channelCode;

    @ApiModelProperty(value = "模板编号")
    private Long templateId;

    @ApiModelProperty(value = "模板编码")
    private String templateCode;

    @ApiModelProperty(value = "短信类型")
    private Integer templateType;

    @ApiModelProperty(value = "短信内容")
    private String templateContent;

    @ApiModelProperty(value = "短信参数")
    private String templateParams;

    @ApiModelProperty(value = "短信 API 的模板编号")
    private String apiTemplateId;

    @ApiModelProperty(value = "手机号")
    private String mobile;

    @ApiModelProperty(value = "用户编号")
    private Long userId;

    @ApiModelProperty(value = "用户类型")
    private Integer userType;

    @ApiModelProperty(value = "发送状态")
    private Integer sendStatus;

    @ApiModelProperty(value = "发送时间")
    private Date sendTime;

    @ApiModelProperty(value = "发送结果的编码")
    private Integer sendCode;

    @ApiModelProperty(value = "发送结果的提示")
    private String sendMsg;

    @ApiModelProperty(value = "短信 API 发送结果的编码")
    private String apiSendCode;

    @ApiModelProperty(value = "短信 API 发送失败的提示")
    private String apiSendMsg;

    @ApiModelProperty(value = "短信 API 发送返回的唯一请求 ID")
    private String apiRequestId;

    @ApiModelProperty(value = "短信 API 发送返回的序号")
    private String apiSerialNo;

    @ApiModelProperty(value = "接收状态")
    private Integer receiveStatus;

    @ApiModelProperty(value = "接收时间")
    private Date receiveTime;

    @ApiModelProperty(value = "API 接收结果的编码")
    private String apiReceiveCode;

    @ApiModelProperty(value = "API 接收结果的说明")
    private String apiReceiveMsg;

    @NotNull(message = "主键id不能为空",groups = {Delete.class})
    private List<Long> delIds;  //批量删除ids

    public SystemSmsLog invertEntity(){
        SystemSmsLog dto = new SystemSmsLog();
        BaseField.invert(this, dto);
        dto.setId(this.getId());
        dto.setChannelId(this.getChannelId());
        dto.setChannelCode(this.getChannelCode());
        dto.setTemplateId(this.getTemplateId());
        dto.setTemplateCode(this.getTemplateCode());
        dto.setTemplateType(this.getTemplateType());
        dto.setTemplateContent(this.getTemplateContent());
        dto.setTemplateParams(this.getTemplateParams());
        dto.setApiTemplateId(this.getApiTemplateId());
        dto.setMobile(this.getMobile());
        dto.setUserId(this.getUserId());
        dto.setUserType(this.getUserType());
        dto.setSendStatus(this.getSendStatus());
        dto.setSendTime(this.getSendTime());
        dto.setSendCode(this.getSendCode());
        dto.setSendMsg(this.getSendMsg());
        dto.setApiSendCode(this.getApiSendCode());
        dto.setApiSendMsg(this.getApiSendMsg());
        dto.setApiRequestId(this.getApiRequestId());
        dto.setApiSerialNo(this.getApiSerialNo());
        dto.setReceiveStatus(this.getReceiveStatus());
        dto.setReceiveTime(this.getReceiveTime());
        dto.setApiReceiveCode(this.getApiReceiveCode());
        dto.setApiReceiveMsg(this.getApiReceiveMsg());
        return dto;
    }
}
